#!/bin/bash
SYSROOT=$NDK/platforms/android-L/arch-arm/
TOOLCHAIN=$NDK/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64
CPU=arm
PREFIX=$(pwd)/android/$CPU
ADDI_CFLAGS="-marm -mfpu=neon"
function build_one
{  ./configure \
    --prefix=$PREFIX \
    --disable-everything \
    --enable-asm \
    --enable-neon \
    --disable-shared \
    --enable-static \
    --enable-cross-compile \
    --disable-doc \
    --disable-symver \
    --disable-ffserver \
    --disable-ffplay \
    --disable-ffprobe \
    --disable-debug \
    --disable-decoders \
    --disable-parsers \
    --disable-bsfs \
    --disable-protocols \
    --disable-indevs \
    --disable-outdevs \
    --disable-filters \
    --disable-encoders \
    --disable-muxers \
    --enable-decoder=h264 \
    --enable-encoder=libx264 \
    --enable-decoder=hevc \
    --enable-encoder=libx265 \
    --disable-muxers \
    --enable-parser=aac \
    --enable-parser=aac \
    --enable-decoder=aac \
    --disable-demuxers \
    --enable-demuxer=mov \
    --enable-muxer=mov \
    --enable-muxer=mp4 \
    --enable-bsf=h264_mp4toannexb \
    --enable-bsf=hevc_mp4toannexb \
    --enable-demuxer=h264 \
    --enable-demuxer=hevc \
    --enable-protocol=file \
--cross-prefix=$TOOLCHAIN/bin/arm-linux-androideabi- \
--target-os=linux \
--arch=arm \
--sysroot=$SYSROOT \
--extra-cflags="-Os -fpic $ADDI_CFLAGS" \
--extra-ldflags="$ADDI_LDFLAGS" \

#make clean
#make -j4
#make install
}

build_one
